<?php $messages = pc_variable("messages"); ?>
<?php if($messages !== null && $messages->get(0) !== null) { ?>
<ul class="messages">
    <?php foreach($messages as $message) { ?>
    <li><?php pc_echo(pc_message($message->getKey(), $message->getParameters())); ?></li>
    <?php } ?>
</ul>
<?php } ?>